test: cover event shorthand normalization gaps#68
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds regression tests to ensure event shorthand normalization produces the same persisted S3 event strings as already-canonical inputs, and that non-shorthand/custom event names pass through unchanged.
Changes:
- Add a unit test confirming shorthand and canonical event names deduplicate after
parse_event_listnormalization. - Add a unit test confirming
normalize_event_namepreserves already-canonical and custom (non-shorthand) event strings.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change adds focused regression coverage for the event shorthand normalization fix merged on
main.Users were affected when shorthand event names such as
put,get,delete,replica, andilmneeded to normalize to the persisted S3 notification event strings. The recent fix corrected the implementation, but there were still untested branches around how those normalized values interact with already-canonical inputs.The root cause of the remaining test gap was that existing coverage only verified shorthand mapping in isolation. It did not verify that shorthand and canonical values collapse to the same persisted event after normalization, and it did not exercise the passthrough branch for already-canonical or custom event names.
This PR keeps scope tight by adding two unit tests in the event command:
Validation
I ran the required repository checks after the test additions:
cargo fmt --all --checkcargo clippy --workspace -- -D warningscargo test --workspace